package com.softeem.example;

public class T {

	public static void main(String[] args) {
		int count;
		int s;
		count = s = 0;
		int a[] = new int[10];
		for (int i = 0; i < 10; i++) {
			a[i] = 1;
		}
		
		while (count < 10) {
			for (int m = 0; m < 10; m++) {
				s = s + a[m];
				if (s % 3 == 0) {
					a[m] = 0;
					count++;
				}
			}
		}

		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i]+" ");
		}
	}

}
